package com.my.validated.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 课程
 * @author timo 2021/4/13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OnlineCourseSaveVo {
    private String id;
    /** 课程名称 */
    @NotBlank
    private String name ;
    /** 课程分类 */
    @NotBlank
    private String courseType;
    /** 课程封面图 */
    private String coverUrl;
    /** 章节数 */
    @NotNull
    private Integer chapterNum;
    /** 单课数(视频数量) */
    @NotNull
    private Integer videoNum;
    /** 简介 */
    @NotBlank
    private String remarks;
    /**章节*/
    @Valid
    @NotNull
    @Size(min = 1)
    private ValidList<OnlineCourseChapterSaveVo> onlineCourseChapterVos;

}
